package com.drelephant.commons;

import java.nio.charset.Charset;
import java.util.Map;

public interface Signature {

    String name();

    String sign(final String context, final String prikey, final Charset charset) throws Exception;

    Map<String, Object> sign(final Map<String, Object> contextMap, final String prikey, final Charset charset) throws Exception;

    boolean verify(final String context, final String sign, final String pubkey,
                   final Charset charset) throws Exception;

    boolean verify(final Map<String, Object> contextMap, final String sign, final String pubkey,
                   final Charset charset) throws Exception;

}
